/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ejercicios;

import java.util.Scanner;

/**
 *
 * @author zpiik3
 */
public class FormulaGeneral {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] arg) {
    Scanner tec = new Scanner(System.in);
    double a,b,c,a1,a2;
    System.out.println("Dame el valor de A");
    a= tec.nextDouble();
    System.out.println("Dame el valor de B");
    b= tec.nextDouble();
    System.out.println("Dame el valor de C");
    c= tec.nextDouble();
    a1= -1*b+(Math.sqrt(Math.pow(b, 2)- 4*(a*c))/(2*a));
    a2=  -1*b+(Math.sqrt(Math.pow(b, 2)- 4*(a*c))/(2*a));


    System.out.println("El primer valor para x es: "+a1+" El segundo valor para x es: "+a2);
 }

}